package com.yunchao.test.domain.repository

import com.yunchao.library.lock.LockEPCInfo
import com.yunchao.test.domain.model.LockToolModel
import com.yunchao.test.domain.model.VoucherTypeModel

internal interface LockToolRepository {

    suspend fun openDevice(): Result<Boolean>

    suspend fun closeDevice()

    suspend fun inventoryOnce(): Result<LockToolModel>

    suspend fun activeLock(
        lockEPCInfo: LockEPCInfo,
        voucherType: VoucherTypeModel
    ): Result<LockToolModel>

    suspend fun openLockWriteLogistics(lockEPCInfo: LockEPCInfo): Result<LockToolModel>
    suspend fun closeLockWriteLogistics(lockEPCInfo: LockEPCInfo): Result<LockToolModel>

    suspend fun openLock(lockEPCInfo: LockEPCInfo): Result<LockToolModel>
    suspend fun closeLock(lockEPCInfo: LockEPCInfo): Result<LockToolModel>

    suspend fun recoveryLock(lockEPCInfo: LockEPCInfo): Result<LockToolModel>
    suspend fun cleanLock(lockEPCInfo: LockEPCInfo): Result<LockToolModel>

    suspend fun readLockLogisticsLog(lockEPCInfo: LockEPCInfo): Result<LockToolModel>
    suspend fun readLockLogCount(lockEPCInfo: LockEPCInfo): Result<LockToolModel>
    suspend fun readLockLog(
        lockEPCInfo: LockEPCInfo,
        start: Int,
        number: Int
    ): Result<LockToolModel>


}